//package com.example.common.config;
//
//
//import com.baomidou.mybatisplus.annotation.DbType;
//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class MyabtisConfig {
//    @Bean
//    public MybatisPlusInterceptor mybatisPlusInterceptor() {
//        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
//        PaginationInnerInterceptor paginationInterceptor = new PaginationInnerInterceptor(DbType.MYSQL);
//        // 设置最大分页大小为1000条记录
//        paginationInterceptor.setMaxLimit(1000L);
//        // 设置溢出总页数后是否进行处理
//        paginationInterceptor.setOverflow(true);
//        interceptor.addInnerInterceptor(paginationInterceptor);
//        return interceptor;
//    }
//}
